import request from '@/utils/request'

// 查询住户核酸任务CRUD列表
export function listHouseholds(query) {
  return request({
    url: '/tasks/household/list',
    method: 'get',
    params: query
  })
}

// 查询住户核酸任务CRUD详细
export function getHousehold(id) {
  return request({
    url: '/tasks/household/' + id,
    method: 'get'
  })
}

// 新增住户核酸任务CRUD
export function addHousehold(data) {
  return request({
    url: '/tasks/household',
    method: 'post',
    data: data
  })
}
// 新增住户核酸任务CRUD
export function getUrl(data) {
  return request({
    url: '/tasks/household/getUrl',
    method: 'post',
    data: data
  })
}

// 修改住户核酸任务CRUD
export function updateHousehold(data) {
  return request({
    url: '/tasks/household',
    method: 'put',
    data: data
  })
}

// 修改住户核酸任务CRUD
export function updateFinish(data) {
  return request({
    url: '/tasks/household/Finish',
    method: 'post',
    data: data
  })
}

// 删除住户核酸任务CRUD
export function delHousehold(id) {
  return request({
    url: '/tasks/household/' + id,
    method: 'delete'
  })
}
